<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jstl/core"
	  xmlns:o="http://openfaces.org/">

<head>
</head>
<body>
	<ui:composition template="/templates/default.xhtml">
		<ui:define name="title">OpenHDS - Membership Details</ui:define>
	
		<ui:param name="crud" value="#{membershipCrud}" />
		
		<ui:define name="listing">
			<ui:include src="list.xhtml" />
		</ui:define>
		<ui:define name="display">
		
			<h:outputText value="#{navController.breadcrumbTrail}" />
		
	        <h1>#{msg.membershipDetail}</h1>
	        <h:form>
	        
	        	 <h:outputText styleClass="error" value="#{membershipCrud.item.statusMessage}" />
	        
	            <h:panelGrid columns="3">
	                <h:outputText value="#{msg.individualId}:"/>
	                <h:outputText />
	                <h:outputText value="#{membershipCrud.item.individual}" converter = "#{individualExtIdConverter}"/>
                	
                	<h:outputText value="#{msg.individualFullName}:" />
                	<h:outputText />
				    <h:outputText value="#{membershipCrud.item.individual.firstName} #{membershipCrud.item.individual.lastName}" /> 
                	
                	<h:outputText value="#{msg.socialGroupId}:" />
                	<h:outputText />
	                <h:outputText value="#{membershipCrud.item.socialGroup}" title = "#{msg.tipSGExtId}" converter = "#{socialGroupExtIdConverter}"/>
                	
                	<h:outputText value="#{msg.membershipRelationToHead}:"/>
					<img class="clickable" onclick="O$('popupWindowForRelationship').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
					<h:outputText value="#{membershipCrud.item.bIsToA}" />
					
                	<h:outputText value="#{msg.membershipStartDate}:" />
                	<h:outputText />
	                <h:outputText value="#{membershipCrud.item.startDate}" converter="#{calendarConverter}"/>
	                
	                <h:outputText value="#{msg.membershipType}:"/> 
	                <img class="clickable" onclick="O$('popupWindowForMembershipStartType').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
	                <h:outputText value="#{membershipCrud.item.startType}" />
	                
	                <h:outputText value="#{msg.membershipEndDate}:" />
	                <h:outputText />
	                <h:outputText value="#{membershipCrud.item.endDate}" converter="#{calendarConverter}"/>
	                
	                <h:outputText value="#{msg.membershipEndType}:"/>
	                <img class="clickable" onclick="O$('popupWindowForMembershipEndType').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
	                <h:outputText value="#{membershipCrud.item.endType}" />
		            
		            <h:outputText value="#{msg.fieldWorkerId}:"/>
		            <h:outputText />
	               	<h:outputText value="#{membershipCrud.item.collectedBy}" converter="#{fieldWorkerExtIdConverter}" />            	
	               	
	               	<h:outputText value="#{msg.insertDate}:"/>
	               	<h:outputText />
	                <h:outputText value="#{membershipCrud.item.insertDate}" converter="#{calendarConverter}" />
					
					<h:outputText value="#{msg.insertBy}:"/>
					<h:outputText />
					<h:outputText value="#{membershipCrud.item.insertBy.fullName}" />
					
					<h:outputText value="#{msg.dataStatus}:"/>
		    		<img class="clickable" onclick="O$('popupWindowForDataStatus').showCentered();" src="#{request.contextPath}/resources/images/question.png" />
					<h:outputText value="#{membershipCrud.item.status}" />	
				</h:panelGrid>
				<br/>
	           	<h:commandButton action="#{membershipCrud.editSetup}" value="#{msg.lblEdit}">
	               <f:setPropertyActionListener target="#{jsfService.itemId}" value="#{membershipCrud.item.uuid}" />
	           	</h:commandButton>
                <h:outputText value=" " />
                <h:commandButton value="#{msg.lblCancel}" immediate="true" action="cancel" rendered="#{flowScope.updating}" />
	        </h:form>
		</ui:define>		
	</ui:composition>
  </body>
</html>